<%@ page import="com.ssm.Entity.Folder" %>
<%@ page import="com.ssm.Entity.File" %>
<%@ page import="java.util.List" %>
<%@ page import="com.ssm.Entity.User" %><%--
  Created by IntelliJ IDEA.
  User: 周筠皓
  Date: 2024/12/18
  Time: 20:11
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>个人文件夹</title>
</head>
<body>
<%  HttpSession session1 = request.getSession();
    Folder folder = (Folder) session1.getAttribute("folder");
    User user = (User) session1.getAttribute("user");
    List<File> fileList = (List<File>) session1.getAttribute("fileList");
%>
    <h1>个人文件夹：<%=folder.getFolderName()%></h1>
    <p>文件夹创建人：<%=user.getUserName()%></p>
    <p>创建人密码：<%=user.getPassword()%></p>
    <br>
    <p>上传的文件：</p>

<table border="1">
    <tr>
        <th>文件Id</th>
        <th>文件上传时的名字</th>
        <th>文件保存后的名字</th>
        <th>文件大小</th>
    </tr>
<%
    for(File file : fileList){
%>
    <tr>
        <td><%=file.getFileId()%></td>
        <td><%=file.getFileRealName()%></td>
        <td><%=file.getFileSaveName()%></td>
        <td><%=file.getFileSize()%>KB</td>
    </tr>
<%
    }
%>
    <br>
    </table>
    <p>剩余空间大小：<%=folder.getFolderSize()%> KB</p><br>
    <button><a href="/SSM_war/fileUp.jsp">上传文件</a></button>
    <button><a href="/SSM_war/file/showFileDownList">下载文件</a></button>
</body>
</html>
